﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>STP_OnPortEnabled</title>
</head>
<body>
	<h3>STP_OnPortEnabled</h3>
	<hr />
<pre>
void STP_OnPortEnabled
(
    BRIDGE*        bridge,
    int            portIndex,
    unsigned long  speedMegabitsPerSecond,
    DUPLEX         duplex,
    unsigned long  timestampMilliseconds
);
</pre>
	<h4>
		Summary</h4>
	<p>
		Function which the application must call when 
		the operational state of a port changes to TRUE. See the Remarks 
		section for more details.</p>
	<h4>
		Parameters</h4>
	<dl>
		<dt>bridge</dt>
		<dd>Pointer to a BRIDGE object, obtained from <a href="STP_CreateBridge.html">
			STP_CreateBridge</a>.</dd>
		<dt>portIndex</dt>
		<dd>The index of the port whose operational state has just changed to TRUE.</dd>
		<dt>speedMegabitsPerSecond</dt>
		<dd>The communication speed detected on the port (a value such as 100 for 100 Mbps).</dd>
		<dt>duplex</dt>
		<dd>The &quot;duplexness&quot; of the port, either FULL_DUPLEX or HALF_DUPLEX.</dd>
		<dt>timestampMilliseconds</dt>
		<dd>A value representing the number of milliseconds elapsed since firmware startup. Used 
			only for the debug log. </dd>
	</dl>
	<h4>
		Remarks</h4>
		<p>
			The operational state of a port is defined in the following documents:</p>
	<ul>
		<li>§17.18.15 of IEEE Standard 802.1w-2001, which references §6.4.2 of IEEE Std. 
			802.1t-2001;</li>
		<li>§17.19.18 of IEEE Standard 802.1D-2001;</li>
		<li>§13.24 of IEEE Standard 802.1Q-2005, which references the above-mentioned 802.1D-2004.</li>
	</ul>
	<p>
		The application can usually detect changes in the operational state of a port by polling 
		an internal register of the PHY of a physical port. Refer to the manual of the bridge IC 
		for specific details on how to do this.</p>
	The current library code was not tested with half-duplex links.

	<p>
			Execution of this function is a potentially lengthy process. 
			It may call various callbacks multiple times.</p>

</body>
</html>
